package com.example.design;

import java.util.ArrayList;
import java.util.List;

public class OOPInterfaceTest {
    public static void main(String[] args) {
        //继承
        Dog dog = new Dog("旺财",4);

        //多态
        Animal cat = new Dog("旺财",4);
        //泛型
        Zoo<Animal> animalZoo = new Zoo<>();
        animalZoo.addObjectAnimal("1");

        animalZoo.addAnimal(cat);
        animalZoo.addAnimal(dog);
    }
}

interface Eat{
    void eat();

}

interface Swim{
    void swim();

}

